public class Demo3 {
    public static int getMaxNum(int...numbers){
        int maxValue=0;
        numbers[1]=11;
        for (int i=0;i<numbers.length;i++){
            if (numbers[i]>maxValue){
                maxValue=numbers[i];
            }
        }

        return maxValue;
    }

    public static void main(String[] args) {
        int[] arr = new int[]{2, 1, 9, 6, 3, 4};
        int max;
        max = getMaxNum(arr);
        System.out.println(max);
    }}